/*
 *  Scenario.m
 *  MapEdit
 *
 *  Created by Steven Canfield on 2/9/09.
 *  Copyright 2009 University of Puget Sound. All rights reserved.
 *
 */

#include "Scenario.h"

void swap_chk_str( chk_str_t * str ) {
	int idx;
	str->count = NSSwapLittleShortToHost( str->count );
	for( idx = 0; idx < 1024; idx++ ) {
		str->offset[idx] = NSSwapLittleShortToHost( str->offset[idx] );
	}
}

void swap_chk_mrgn( chk_mrgn_t * mrgn ) {
	mrgn->start_x			= NSSwapLittleIntToHost( mrgn->start_x );
	mrgn->start_y			= NSSwapLittleIntToHost( mrgn->start_y );
	mrgn->end_x				= NSSwapLittleIntToHost( mrgn->end_x );
	mrgn->end_y				= NSSwapLittleIntToHost( mrgn->end_y );
	mrgn->name_index		= NSSwapLittleShortToHost( mrgn->name_index );
	mrgn->elevation_flags	= NSSwapLittleShortToHost( mrgn->elevation_flags );
}